#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

void reverse(int arr[],int left,int right) {
	while (left <= right) {
		int tmp = arr[left];
		arr[left] = arr[right];
		arr[right] = tmp;
		left++;
		right--;
	}
}

int main() {
	int arr[5] = { 1,2,3,4,5 };
	int n = 1;
	int sz = sizeof(arr) / sizeof(arr[0])-1;
	reverse(arr,0,n-1);
	reverse(arr, n, sz);
	reverse(arr, 0, sz);
	for (int i = 0; i <= sz; i++) {
		printf("%d", arr[i]);
	}
}